package edu.zut.cs.software.cms.module.student.domain;


import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import edu.zut.cs.software.cms.base.domain.BaseEntity;

/**
 * 
 * @author 任雪燕
 * 
 * entity class for student
 * 
 * Basic information about students
 *
 */

@Entity
@Table(name = "T_STUDENT")
public class Student extends BaseEntity<Long>{
	
	private static final long serialVersionUID = 3495610735789909775L;
	
	/**
	 * Student ID Code
	 */
	@Column
	String code;
	
	/**
	 * full name
	 */
	@Column
	String name;
	
	/**
	 * male or female
	 */
	@Column
	String gender;
	
	/**
	 * address for this student
	 */
	@Column
	String address;
	
	/**
	 * student's telephone number
	 */
	@Column
	String tel;
	
	/**
	 * student's email
	 */
	@Column
	String email;
	
	
	/**
	 * Many students relate to one StudentArea.
	 */
	@ManyToOne
	@JoinColumn(name = "STUDENT_AREA_ID")
	StudentArea studentArea;

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getGender() {
		return gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getTel() {
		return tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public StudentArea getStudentArea() {
		return studentArea;
	}

	public void setStudentArea(StudentArea studentArea) {
		this.studentArea = studentArea;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	
	

}
